
$(document).ready(function() {
	$(".header-content-whats").hover(
		function(){
			$('.header-content-whats-backslide').slideToggle(200);
		});

	start_home_js();
});

function change_body_whats(divNum){
	$('.body-content-wrapper').slideUp(500);
	setTimeout(function(){
		$('.body-content-wrapper').html('');
		$('.body-content-wrapper').load('whats.php');
		$('.body-content-wrapper').slideDown(500, function() {
			$('.text'+divNum).effect("highlight", {color:"#b1b1b1"}, 3000);
		});
	},500);

}

function load_home(){
	$('.body-content-wrapper').slideUp(500);
	setTimeout(function(){
		$('.body-content-wrapper').html('');
		$('.body-content-wrapper').load('home.php', null, function(){
			//var slideDivs = $('#slides');
			start_home_js();
		});
		$('.body-content-wrapper').slideDown(500);
	},800);

}


function start_home_js() {

	var slideTextInterval;
    function slide_text() {
 		window.clearInterval(slideTextInterval);
 		
        slideTextInterval = setInterval(function(){
            $(".home-slider-text div:first").slideUp(800, function() {
                var $this = $(this);
                $this.parent().append(this);
                $this.show();
                //slide_text();
            });
        },3000);
	}

	slide_text();

<!-- SlidesJS Required: Initialize SlidesJS with a jQuery doc ready -->

	$('#slides').slidesjs({
		width: 940,
		height:370,

		play: {
			active: true,
			// [boolean] Generate the play and stop buttons.
			// You cannot use your own buttons. Sorry.
			effect: "slide",
			// [string] Can be either "slide" or "fade".
			interval: 5000,
			// [number] Time spent on each slide in milliseconds.
			auto: true,
			// [boolean] Start playing the slideshow on load.
			swap: false,
			// [boolean] show/hide stop and play buttons
			pauseOnHover: false,
			// [boolean] pause a playing slideshow on hover
			restartDelay: 1000
			// [number] restart delay on inactive slideshow
		},
        navigation: {
			active: false,
			// [boolean] Generates next and previous buttons.
			// You can set to false and use your own buttons.
			// User defined buttons must have the following:
			// previous button: class="slidesjs-previous slidesjs-navigation"
			// next button: class="slidesjs-next slidesjs-navigation"
			effect: "slide"
			// [string] Can be either "slide" or "fade".
		},
		callback: {
			loaded: function(number) {
				// Use your browser console to view log
				//console.log('SlidesJS: Loaded with slide #' + number);

				// Show start slide in log
				$('#slidesjs-log .slidesjs-slide-number').text(number);

				$('#text0'+number).fadeIn(300);

			},
			start: function(number) {
				// Use your browser console to view log
				//console.log('SlidesJS: Start Animation on slide #' + number);
				var result = number - 1;
				//console.log('resultado ' + result);
				$('#text0'+number).fadeOut(200);

			},
			complete: function(number) {
				// Use your browser console to view log
				//console.log('SlidesJS: Animation Complete. Current slide is #' + number);

				// Change slide number on animation complete
				$('#slidesjs-log .slidesjs-slide-number').text(number);
				$('#text0'+number).fadeIn(300);
			}
		}
	});
}